/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-10-21
 * Time:14:59
 */
public class TestDemo {
    public static void main(String[] args) {
        MyArrayList myArraylist = new MyArrayList();
        myArraylist.add(1);
        myArraylist.add(2);
        myArraylist.add(3);
        myArraylist.add(4);
       myArraylist.add(5);
        //myArraylist.add(1);
        //myArraylist.add(1);
        //myArraylist.add(1);
        //myArraylist.add(1);
        //myArraylist.add(1);
        //myArraylist.add(1);//此时数组已经满了，再存入数据就会发生越界访问的异常
      //  myArraylist.display();
//        try {
//            myArraylist.contains(1);
//        }catch (NullException e){
//
//        }
        //System.out.println(myArraylist.size());
       // myArraylist.add(7,6);
      //  myArraylist.add(10);
       // System.out.println(myArraylist.size());
        //myArraylist.display();
      //  myArraylist.display();
      //  System.out.println();
       // myArraylist.set(4,4);
       // myArraylist.display();
       myArraylist.add(6,5);
        myArraylist.display();
    }
}
